package cn.evolution.retryutils.configuration;

import cn.evolution.retryutils.annotations.StartBeans;
import cn.evolution.retryutils.bean.SimpleBean;
import cn.evolution.retryutils.utils.Constants;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.*;

/**
 * @author evolution
 * @title: RetryAutoConfiguration
 * @projectName retry-utils
 * @description: TODO
 * @date 2022-11-17 10:20
 */
@ComponentScans(value = {
        @ComponentScan(value = "cn.evolution.retryutils")
})
@Configuration
@PropertySources({
        @PropertySource(value = "classpath:retry.properties",ignoreResourceNotFound = true)
})
@ConditionalOnProperty(name = Constants.RETRY_AUTO_CONFIG_ENABLE,matchIfMissing = true)
@StartBeans
public class RetryAutoConfiguration {
    @Bean
    public SimpleBean simpleBean(){ return new SimpleBean(); }
}
